package com.example.demo.mapper;

import com.example.demo.entity.requestJson.IsFavoriteReq;
import com.example.demo.entity.responseJson.AFollowingRes;
import com.example.demo.mapper.base.FavoriteAuthorBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * 收藏作者表(FavoriteAuthor)表数据库访问层
 *
 * @author 杨丽辉
 * @since 2021-03-06 14:40:00
 */
@Component
@Mapper
public interface FavoriteAuthorMapper extends FavoriteAuthorBaseMapper {
    int isFavoriteAuthor (@Param("isFavoriteReq") IsFavoriteReq isFavoriteReq);
    List<AFollowingRes> queryAFollowing(@Param("userId") String userId);
    int queryAttentioncount(@Param("userId") String userId);
    int queryReadercount(@Param("authorId") String authorId);
    List<AFollowingRes> queryReaderAuthor(@Param("authorId") String authorId);
    List<AFollowingRes> queryReaderUser(@Param("authorId") String authorId);

}
